<template>
  <div>
    <s-nav-bar title="最近阅读"></s-nav-bar>
    <recent-list :data="datalist"></recent-list>
  </div>
</template>

<script>
import sNavBar from  '@/components/sNavBar.vue'
import RecentList from  '@/components/RecentList.vue'
export default {
  components:{
    sNavBar,
    RecentList
  },
  data(){
    return {
      datalist:{}
    }
  },
  created(){
    let json = localStorage.getItem('recentRead');
    let readBook = JSON.parse(localStorage.getItem('recentRead'));
    this.$http.get(this.$route.meta.dataURL,{
      params:{json}
    })
    .then(res => {
      
      this.datalist = res.data.data
    })
    .catch(err => {
      throw ('没问题的，加油!')
    })
  }
}
</script>

<style>

</style>